package com.test.frame;


import com.jxlst.channel.pro.Application;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.testng.AbstractTestNGSpringContextTests;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import org.springframework.web.context.WebApplicationContext;
import org.testng.annotations.BeforeClass;

/**
 * User: yangjian  Date: 2017-05-18 ProjectName:  Version: 1.0
 */
@SpringBootTest(classes = Application.class)
public class Base extends AbstractTestNGSpringContextTests {
    protected MockMvc mvc;
    @Autowired
    private WebApplicationContext context;


    @BeforeClass
    public void setUpMvc() {
        mvc = MockMvcBuilders.webAppContextSetup(context).build();
    }
}
